<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Os1: /home/alejandro/Desarrollo eclipse/os1/include/Converter.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Os1
   &#160;<span id="projectnumber">1</span>
   </div>
   <div id="projectbrief">OrbSlam2 documentado y modificado</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,'Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_converter_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Converter.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_converter_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#ifndef CONVERTER_H</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#define CONVERTER_H</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include&lt;opencv2/core/core.hpp&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include&lt;eigen3/Eigen/Dense&gt;</span>    <span class="comment">//#include&lt;eigen3/Eigen/Dense&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include&quot;../Thirdparty/g2o/g2o/types/types_six_dof_expmap.h&quot;</span>    <span class="comment">//#include &quot;../Thirdparty/g2o/g2o/types/types_six_dof_expmap.h&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include&quot;../Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h&quot;</span>  <span class="comment">//#include &quot;../Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="namespace_o_r_b___s_l_a_m2.html">   31</a></span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_o_r_b___s_l_a_m2.html">ORB_SLAM2</a></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;{</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="class_o_r_b___s_l_a_m2_1_1_converter.html">   40</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html">Converter</a></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;{</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keyword">static</span> std::vector&lt;cv::Mat&gt; <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#abef47701eefdbc74c2c1625c140963fd">toDescriptorVector</a>(<span class="keyword">const</span> cv::Mat &amp;Descriptors);</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keyword">static</span> <a class="code" href="classg2o_1_1_s_e3_quat.html">g2o::SE3Quat</a> <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#a0b73791a3e2d90b4de41aed0ece2d0a2">toSE3Quat</a>(<span class="keyword">const</span> cv::Mat &amp;cvT);</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keyword">static</span> <a class="code" href="classg2o_1_1_s_e3_quat.html">g2o::SE3Quat</a> <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#a0b73791a3e2d90b4de41aed0ece2d0a2">toSE3Quat</a>(<span class="keyword">const</span> <a class="code" href="structg2o_1_1_sim3.html">g2o::Sim3</a> &amp;gSim3);</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keyword">static</span> cv::Mat <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#ac9d5a9ea7de26d34047aa0afddaa2091">toCvMat</a>(<span class="keyword">const</span> <a class="code" href="classg2o_1_1_s_e3_quat.html">g2o::SE3Quat</a> &amp;SE3);</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keyword">static</span> cv::Mat <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#ac9d5a9ea7de26d34047aa0afddaa2091">toCvMat</a>(<span class="keyword">const</span> <a class="code" href="structg2o_1_1_sim3.html">g2o::Sim3</a> &amp;Sim3);</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keyword">static</span> cv::Mat <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#ac9d5a9ea7de26d34047aa0afddaa2091">toCvMat</a>(<span class="keyword">const</span> Eigen::Matrix&lt;double,4,4&gt; &amp;m);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keyword">static</span> cv::Mat <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#ac9d5a9ea7de26d34047aa0afddaa2091">toCvMat</a>(<span class="keyword">const</span> Eigen::Matrix3d &amp;m);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keyword">static</span> cv::Mat <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#ac9d5a9ea7de26d34047aa0afddaa2091">toCvMat</a>(<span class="keyword">const</span> Eigen::Matrix&lt;double,3,1&gt; &amp;m);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="keyword">static</span> cv::Mat <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#a0972ca8f56ea15c1814f51be3804978f">toCvSE3</a>(<span class="keyword">const</span> Eigen::Matrix&lt;double,3,3&gt; &amp;R, <span class="keyword">const</span> Eigen::Matrix&lt;double,3,1&gt; &amp;t);</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keyword">static</span> Eigen::Matrix&lt;double,3,1&gt; <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#a65fccab585e29d1acbf4c23e5ce69bdc">toVector3d</a>(<span class="keyword">const</span> cv::Mat &amp;cvVector);</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keyword">static</span> Eigen::Matrix&lt;double,3,1&gt; <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#a65fccab585e29d1acbf4c23e5ce69bdc">toVector3d</a>(<span class="keyword">const</span> cv::Point3f &amp;cvPoint);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keyword">static</span> Eigen::Matrix&lt;double,3,3&gt; <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#a000a7971e46afdc95d6692a70006182b">toMatrix3d</a>(<span class="keyword">const</span> cv::Mat &amp;cvMat3);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keyword">static</span> std::vector&lt;float&gt; <a class="code" href="class_o_r_b___s_l_a_m2_1_1_converter.html#a16b54bd921d9cdc83d289cfd1598fb3c">toQuaternion</a>(<span class="keyword">const</span> cv::Mat &amp;M);</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;};</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;}<span class="comment">// namespace ORB_SLAM</span></div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="preprocessor">#endif // CONVERTER_H</span></div><div class="ttc" id="class_o_r_b___s_l_a_m2_1_1_converter_html_a0972ca8f56ea15c1814f51be3804978f"><div class="ttname"><a href="class_o_r_b___s_l_a_m2_1_1_converter.html#a0972ca8f56ea15c1814f51be3804978f">ORB_SLAM2::Converter::toCvSE3</a></div><div class="ttdeci">static cv::Mat toCvSE3(const Eigen::Matrix&lt; double, 3, 3 &gt; &amp;R, const Eigen::Matrix&lt; double, 3, 1 &gt; &amp;t)</div><div class="ttdoc">Convierte matrices SE3 de Eigen a Mat. </div><div class="ttdef"><b>Definition:</b> Converter.cc:93</div></div>
<div class="ttc" id="class_o_r_b___s_l_a_m2_1_1_converter_html"><div class="ttname"><a href="class_o_r_b___s_l_a_m2_1_1_converter.html">ORB_SLAM2::Converter</a></div><div class="ttdoc">Convertidor entre g2o y opencv. </div><div class="ttdef"><b>Definition:</b> Converter.h:40</div></div>
<div class="ttc" id="structg2o_1_1_sim3_html"><div class="ttname"><a href="structg2o_1_1_sim3.html">g2o::Sim3</a></div><div class="ttdef"><b>Definition:</b> sim3.h:41</div></div>
<div class="ttc" id="class_o_r_b___s_l_a_m2_1_1_converter_html_abef47701eefdbc74c2c1625c140963fd"><div class="ttname"><a href="class_o_r_b___s_l_a_m2_1_1_converter.html#abef47701eefdbc74c2c1625c140963fd">ORB_SLAM2::Converter::toDescriptorVector</a></div><div class="ttdeci">static std::vector&lt; cv::Mat &gt; toDescriptorVector(const cv::Mat &amp;Descriptors)</div><div class="ttdoc">Convierte una matriz Mat de descriptores en un vector de descriptores Mat. </div><div class="ttdef"><b>Definition:</b> Converter.cc:27</div></div>
<div class="ttc" id="class_o_r_b___s_l_a_m2_1_1_converter_html_a000a7971e46afdc95d6692a70006182b"><div class="ttname"><a href="class_o_r_b___s_l_a_m2_1_1_converter.html#a000a7971e46afdc95d6692a70006182b">ORB_SLAM2::Converter::toMatrix3d</a></div><div class="ttdeci">static Eigen::Matrix&lt; double, 3, 3 &gt; toMatrix3d(const cv::Mat &amp;cvMat3)</div><div class="ttdoc">Convierte Mat a Eigen. </div><div class="ttdef"><b>Definition:</b> Converter.cc:127</div></div>
<div class="ttc" id="namespace_o_r_b___s_l_a_m2_html"><div class="ttname"><a href="namespace_o_r_b___s_l_a_m2.html">ORB_SLAM2</a></div><div class="ttdoc">This file is part of ORB-SLAM2. </div><div class="ttdef"><b>Definition:</b> Converter.h:31</div></div>
<div class="ttc" id="class_o_r_b___s_l_a_m2_1_1_converter_html_a0b73791a3e2d90b4de41aed0ece2d0a2"><div class="ttname"><a href="class_o_r_b___s_l_a_m2_1_1_converter.html#a0b73791a3e2d90b4de41aed0ece2d0a2">ORB_SLAM2::Converter::toSE3Quat</a></div><div class="ttdeci">static g2o::SE3Quat toSE3Quat(const cv::Mat &amp;cvT)</div><div class="ttdoc">Convierte un Mat a SE3Quat. </div><div class="ttdef"><b>Definition:</b> Converter.cc:37</div></div>
<div class="ttc" id="classg2o_1_1_s_e3_quat_html"><div class="ttname"><a href="classg2o_1_1_s_e3_quat.html">g2o::SE3Quat</a></div><div class="ttdef"><b>Definition:</b> se3quat.h:41</div></div>
<div class="ttc" id="class_o_r_b___s_l_a_m2_1_1_converter_html_a65fccab585e29d1acbf4c23e5ce69bdc"><div class="ttname"><a href="class_o_r_b___s_l_a_m2_1_1_converter.html#a65fccab585e29d1acbf4c23e5ce69bdc">ORB_SLAM2::Converter::toVector3d</a></div><div class="ttdeci">static Eigen::Matrix&lt; double, 3, 1 &gt; toVector3d(const cv::Mat &amp;cvVector)</div><div class="ttdoc">Convierte un vector 3D de Mat a Eigen. </div><div class="ttdef"><b>Definition:</b> Converter.cc:111</div></div>
<div class="ttc" id="class_o_r_b___s_l_a_m2_1_1_converter_html_a16b54bd921d9cdc83d289cfd1598fb3c"><div class="ttname"><a href="class_o_r_b___s_l_a_m2_1_1_converter.html#a16b54bd921d9cdc83d289cfd1598fb3c">ORB_SLAM2::Converter::toQuaternion</a></div><div class="ttdeci">static std::vector&lt; float &gt; toQuaternion(const cv::Mat &amp;M)</div><div class="ttdoc">Convierte Mat a vector. </div><div class="ttdef"><b>Definition:</b> Converter.cc:138</div></div>
<div class="ttc" id="class_o_r_b___s_l_a_m2_1_1_converter_html_ac9d5a9ea7de26d34047aa0afddaa2091"><div class="ttname"><a href="class_o_r_b___s_l_a_m2_1_1_converter.html#ac9d5a9ea7de26d34047aa0afddaa2091">ORB_SLAM2::Converter::toCvMat</a></div><div class="ttdeci">static cv::Mat toCvMat(const g2o::SE3Quat &amp;SE3)</div><div class="ttdoc">Convierte SE3Quat a Mat. </div><div class="ttdef"><b>Definition:</b> Converter.cc:49</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="_converter_8h.html">Converter.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
